﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using P2ClientGate;

namespace RiskMan.DataClass.Models.Plaza_II
{
    /// <summary>
    /// Транзакции
    /// </summary>

    class Transaction
    {

        private CP2BLMessage mes = new CP2BLMessageClass();


        public void SendAssynTransaction()
        {

           // SchemeDesc schemeDesc = pub.Scheme;
           // MessageDesc messageDesc = schemeDesc.Messages[0]; //AddMM
           // FieldDesc fieldDesc = messageDesc.Fields[3];

           //// Message sendMessage = pub.NewMessage(MessageKeyType.KeyName, "FutAddOrder");

           // //DataMessage smsg = (DataMessage)sendMessage;
           // smsg.UserId = (uint)counter;
           // smsg["broker_code"].set("0400");
           // smsg["isin"].set("UX-12.13");
           // smsg["client_code"].set("089");
           // smsg["type"].set(1);
           // smsg["dir"].set(1);
           // smsg["amount"].set(1);
           // smsg["price"].set("919");
           // smsg["comment"].set("");
           // smsg["broker_to"].set("");
           // smsg["ext_id"].set(0);
           // smsg["du"].set(0);
           // smsg["date_exp"].set("");
           // smsg["hedge"].set(0);
           // smsg["dont_check_money"].set(0);
           // string localDateTime = DateTime.Now.ToString() + "." + DateTime.Now.Millisecond.ToString();
           // CultureInfo culture = new CultureInfo("ja-JP");
           // string localDateTime = DateTime.Now.ToString(culture) + "." + DateTime.Now.Millisecond;
           // smsg["local_stamp"].set(localDateTime);
            //System.Console.WriteLine("posting message dump: {0}", sendMessage);
            //pub.Post(sendMessage, PublishFlag.NeedReply);
            //sendMessage.Dispose();
        }

    }
}
